<%--
  Created by IntelliJ IDEA.
  User: WangXin
  Date: 2020/1/6
  Time: 16:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
    <base href="<%=basePath %>">
    <meta charset="UTF-8">
    <title>关于我们</title>

    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="css/font/iconfont.css?v=1.0.0" media="all">
    <link rel="stylesheet" type="text/css" href="js/layui/css/layui.css" media="all">
    <script type="text/javascript" src="js/common/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="js/layui/layui.js"></script>
    <script type="text/javascript" src="js/jQueryFileUpload/js/vendor/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="js/jQueryFileUpload/js/jquery.iframe-transport.js"></script>
    <script type="text/javascript" src="js/jQueryFileUpload/js/jquery.fileupload.js"></script>

</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>关于我们</legend>
</fieldset>
<div style="margin-top:10px;">
    <div style="float: left; display: block; margin: 0px 10px; overflow: auto; width: 240px;
        height: 763px; border: solid 1px #CCC; background: #FFF;">
        <div align="center">
            <ul class="gywmData" id="gywmMsg">
                <c:forEach items="${list}" var="obj">
                    <br>
                    <li>
                        <button type="button" class="layui-btn layui-btn-lg layui-btn-radius layui-btn-normal"
                                id="button${obj.id}" onclick="queryDetails(${obj.id})">
                                ${obj.typeName}
                        </button>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>

    <div id="gywmDetails" style="height: 763px;border: solid 1px #CCC ;background:#ffffff; margin-left: 256px;">

    </div>
</div>
</body>
<script>
    function queryDetails(num) {

        /* //获取button的id,判断需要请求哪个id的信息
         var id = event.target.id;
         //console.log(id)
         //截取出id
         var num = id.charAt(id.length-1)*/
        //console.log(num)
        $.ajax({
            type:"post",
            url:"GYWM/toDetails.do",
            data:{id:num},
            dataType:'html',
            success:function(json){
                //console.log('第一次值返回成功')
                $("#gywmDetails").html(json);
            }
        });
    }
</script>
</html>